package com.insigma.business.qrcode.soldier.util;

import java.util.regex.Pattern;


public class BizCheckUtils {

    private static final String REGEX_MOBILE = "((^(13|15|18|17|19)[0-9]{9}$)|(^0[1,2]{1}\\d{1}-?\\d{8}$)|(^0[3-9]{1}\\d{2}-?\\d{7,8}$)|(^0[1,2]{1}\\d{1}-?\\d{8}-(\\d{1,4})$)|(^0[3-9]{1}\\d{2}-?\\d{7,8}-(\\d{1,4})$))";


    
    public static boolean checkMobile(final String mobile) {
        if(mobile==null || !Pattern.matches(REGEX_MOBILE, mobile)){
            return false;
        }
        return true;
    }
}
